home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / gs25dos1.zip / HERSHEY.DOC < prev    next >
Text File  |  1990-02-08  |  11KB  |  262 lines

  1. This file is part of Ghostscript.  Unlike the rest of Ghostscript, it
  2. consists entirely of information copied directly from public sources.  It
  3. therefore is not covered by the Ghostscript copyright or license.
  4.  
  5. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  6.  
  7. Mod.sources:  Volume 4, Issue 42
  8. Submitted by: pyramid!octopus!pete (Pete Holzmann)
  9.  
  10.  
  11. This is part 1 of five parts of the first Usenet distribution of
  12. the Hershey Fonts. See the README file for more details.
  13.  
  14.  
  15. Peter Holzmann, Octopus Enterprises
  16. USPS: 19611 La Mar Court, Cupertino, CA 95014
  17. UUCP: {hplabs!hpdsd,pyramid}!octopus!pete
  18. Phone: 408/996-7746
  19.  
  20.  
  21. This distribution is made possible through the collective encouragement
  22. of the Usenet Font Consortium, a mailing list that sprang to life to get
  23. this accomplished and that will now most likely disappear into the mists
  24. of time... Thanks are especially due to Jim Hurt, who provided the packed
  25. font data for the distribution, along with a lot of other help.
  26.  
  27. This file describes the Hershey Fonts in general, along with a description of
  28. the other files in this distribution and a simple re-distribution restriction.
  29.  
  30. USE RESTRICTION:
  31.     This distribution of the Hershey Fonts may be used by anyone for
  32.     any purpose, commercial or otherwise, providing that:
  33.         1. The following acknowledgements must be distributed with
  34.             the font data:
  35.             - The Hershey Fonts were originally created by Dr.
  36.                 A. V. Hershey while working at the U. S.
  37.                 National Bureau of Standards.
  38.             - The format of the Font data in this distribution
  39.                 was originally created by
  40.                     James Hurt
  41.                     Cognition, Inc.
  42.                     900 Technology Park Drive
  43.                     Billerica, MA 01821
  44.                     (mit-eddie!ci-dandelion!hurt)
  45.         2. The font data in this distribution may be converted into
  46.             any other format *EXCEPT* the format distributed by
  47.             the U.S. NTIS (which organization holds the rights
  48.             to the distribution and use of the font data in that
  49.             particular format). Not that anybody would really
  50.             *want* to use their format... each point is described
  51.             in eight bytes as "xxx yyy:", where xxx and yyy are
  52.             the coordinate values as ASCII numbers.
  53.  
  54. *PLEASE* be reassured: The legal implications of NTIS' attempt to control
  55. a particular form of the Hershey Fonts *are* troubling. HOWEVER: We have
  56. been endlessly and repeatedly assured by NTIS that they do not care what
  57. we do with our version of the font data, they do not want to know about it,
  58. they understand that we are distributing this information all over the world,
  59. etc etc etc... but because it isn't in their *exact* distribution format, they
  60. just don't care!!! So go ahead and use the data with a clear conscience! (If
  61. you feel bad about it, take a smaller deduction for something on your taxes
  62. next week...)
  63.  
  64. The Hershey Fonts:
  65.     - are a set of more than 2000 glyph (symbol) descriptions in vector 
  66.         ( <x,y> point-to-point ) format
  67.     - can be grouped as almost 20 'occidental' (english, greek,
  68.         cyrillic) fonts, 3 or more 'oriental' (Kanji, Hiragana,
  69.         and Katakana) fonts, and a few hundred miscellaneous
  70.         symbols (mathematical, musical, cartographic, etc etc)
  71.     - are suitable for typographic quality output on a vector device
  72.         (such as a plotter) when used at an appropriate scale.
  73.     - were digitized by Dr. A. V. Hershey while working for the U.S.
  74.         Government National Bureau of Standards (NBS).
  75.     - are in the public domain, with a few caveats:
  76.         - They are available from NTIS (National Technical Info.
  77.             Service) in a computer-readable from which is *not*
  78.             in the public domain. This format is described in
  79.             a hardcopy publication "Tables of Coordinates for
  80.             Hershey's Repertory of Occidental Type Fonts and
  81.             Graphic Symbols" available from NTIS for less than
  82.             $20 US (phone number +1 703 487 4763).
  83.         - NTIS does not care about and doesn't want to know about
  84.             what happens to Hershey Font data that is not
  85.             distributed in their exact format.
  86.         - This distribution is not in the NTIS format, and thus is
  87.             only subject to the simple restriction described
  88.             at the top of this file.
  89.  
  90. Hard Copy samples of the Hershey Fonts are best obtained by purchasing the
  91. book described above from NTIS. It contains a sample of all of the Occidental
  92. symbols (but none of the Oriental symbols).
  93.  
  94. This distribution:
  95.     - contains
  96.         * a complete copy of the Font data using the original
  97.             glyph-numbering sequence
  98.         * a set of translation tables that could be used to generate
  99.             ASCII-sequence fonts in various typestyles
  100.         * a couple of sample programs in C and Fortran that are
  101.             capable of parsing the font data and displaying it
  102.             on a graphic device (we recommend that if you
  103.             wish to write programs using the fonts, you should
  104.             hack up one of these until it works on your system)
  105.             
  106.     - consists of the following files...
  107.         hershey.doc - details of the font data format, typestyles and
  108.                 symbols included, etc.
  109.         hersh.oc[1-4] - The Occidental font data (these files can
  110.                     be catenated into one large database)
  111.         hersh.or[1-4] - The Oriental font data (likewise here)
  112.         *.hmp - Occidental font map files. Each file is a translation
  113.                 table from Hershey glyph numbers to ASCII
  114.                 sequence for a particular typestyle.
  115.         hershey.f77 - A fortran program that reads and displays all
  116.                 of the glyphs in a Hershey font file.
  117.         hershey.c   - The same, in C, using GKS, for MS-DOS and the
  118.                 PC-Color Graphics Adaptor.
  119.  
  120. Additional Work To Be Done (volunteers welcome!):
  121.  
  122.     - Integrate this complete set of data with the hershey font typesetting
  123.         program recently distributed to mod.sources
  124.     - Come up with an integrated data structure and supporting routines
  125.         that make use of the ASCII translation tables
  126.     - Digitize additional characters for the few places where non-ideal
  127.         symbol substitutions were made in the ASCII translation tables.
  128.     - Make a version of the demo program (hershey.c or hershey.f77) that
  129.         uses the standard Un*x plot routines.
  130.     - Write a banner-style program using Hershey Fonts for input and
  131.         non-graphic terminals or printers for output.
  132.     - Anything else you'd like!
  133.  
  134. SHAR_EOF
  135.  
  136. This file provides a brief description of the contents of the Occidental
  137. Hershey Font Files. For a complete listing of the fonts in hard copy, order
  138. NBS Special Publication 424, "A contribution to computer typesetting 
  139. techniques: Tables of Coordinates for Hershey's Repertory of Occidental
  140. Type Fonts and Graphic Symbols". You can get it from NTIS (phone number is
  141. +1 703 487 4763) for less than twenty dollars US.
  142.  
  143. Basic Glyph (symbol) data:
  144.  
  145.         hersh.oc1       - numbers 1 to 1199
  146.         hersh.oc2       - numbers 1200 to 2499
  147.         hersh.oc3       - numbers 2500 to 3199
  148.         hersh.oc4       - numbers 3200 to 3999
  149.  
  150.         These four files contain approximately 19 different fonts in
  151. the A-Z alphabet plus greek and cyrillic, along with hundreds of special
  152. symbols, described generically below.
  153.  
  154.         There are also four files of Oriental fonts (hersh.or[1-4]). These
  155. files contain symbols from three Japanese alphabets (Kanji, Hiragana, and
  156. Katakana). It is unknown what other symbols may be contained therein, nor
  157. is it known what order the symbols are in (I don't know Japanese!).
  158.  
  159.         Back to the Occidental files:
  160.  
  161. Fonts:
  162.         Roman: Plain, Simplex, Duplex, Complex Small, Complex, Triplex
  163.         Italic: Complex Small, Complex, Triplex
  164.         Script: Simplex, Complex
  165.         Gothic: German, English, Italian
  166.         Greek: Plain, Simplex, Complex Small, Complex
  167.         Cyrillic: Complex
  168.  
  169. Symbols:
  170.         Mathematical (227-229,232,727-779,732,737-740,1227-1270,2227-2270,
  171.                         1294-1412,2294-2295,2401-2412)
  172.         Daggers (for footnotes, etc) (1276-1279, 2276-2279)
  173.         Astronomical (1281-1293,2281-2293)
  174.         Astrological (2301-2312)
  175.         Musical (2317-2382)
  176.         Typesetting (ffl,fl,fi sorts of things) (miscellaneous places)
  177.         Miscellaneous (mostly in 741-909, but also elsewhere):
  178.                 - Playing card suits
  179.                 - Meteorology
  180.                 - Graphics (lines, curves)
  181.                 - Electrical
  182.                 - Geometric (shapes)
  183.                 - Cartographic
  184.                 - Naval
  185.                 - Agricultural
  186.                 - Highways
  187.                 - Etc...
  188.  
  189.  
  190. ASCII sequence translation files:
  191.  
  192.         The Hershey glyphs, while in a particular order, are not in an
  193.         ASCII sequence. I have provided translation files that give the
  194.         sequence of glyph numbers that will most closely approximate the
  195.         ASCII printing sequence (from space through ~, with the degree
  196.         circle tacked on at the end) for each of the above fonts:
  197.  
  198.         File names are made up of fffffftt.hmp,
  199.  
  200.                 where ffffff is the font style, one of:
  201.                         roman   Roman
  202.                         greek   Greek
  203.                         italic  Italic
  204.                         script  Script
  205.                         cyril   Cyrillic (some characters not placed in
  206.                                            the ASCII sequence)
  207.                         gothgr  Gothic German
  208.                         gothgb  Gothic English
  209.                         gothit  Gothic Italian
  210.  
  211.                 and tt is the font type, one of:
  212.                     p       Plain (very small, no lower case)
  213.                     s       Simplex (plain, normal size, no serifs)
  214.                     d       Duplex (normal size, no serifs, doubled lines)
  215.                     c       Complex (normal size, serifs, doubled lines)
  216.                     t       Triplex (normal size, serifs, tripled lines)
  217.                     cs      Complex Small (Complex, smaller than normal size)
  218.  
  219. The three sizes are coded with particular base line (bottom of a capital
  220.         letter) and cap line (top of a capital letter) values for 'y':
  221.  
  222.         Size            Base Line       Cap Line
  223.  
  224.         Very Small         -5              +4 
  225.         Small              -6              +7
  226.         Normal             -9              +12
  227.  
  228.         (Note: some glyphs in the 'Very Small' fonts are actually 'Small')
  229.  
  230. The top line and bottom line, which are normally used to define vertical
  231.         spacing, are not given. Maybe somebody can determine appropriate
  232.         values for these!
  233.  
  234. The left line and right line, which are used to define horizontal spacing,
  235.         are provided with each character in the database.
  236.  
  237. SHAR_EOF
  238.  
  239. Format of Hershey glyphs:
  240.  
  241. 5 bytes    - glyphnumber
  242. 3 bytes    - length of data  length in 16-bit words including left&right numbers
  243. 1 byte    - x value of left margin
  244. 1 byte    - x value of right margin
  245. (length*2)-2 bytes    - stroke data
  246.  
  247. left&right margins and stroke data are biased by the value of the letter 'R'
  248. Subtract the letter 'R' to get the data.
  249.  
  250. e.g. if the data byte is 'R', the data is 0
  251.      if the data byte is 'T', the data is +2
  252.      if the data byte is 'J', the data is -8
  253.  
  254. and so on...
  255.  
  256. The coordinate system is x-y, with the origin (0,0) in the center of the
  257. glyph.  X increases to the right and y increases *down*.
  258.  
  259. The stroke data is pairs of bytes, one byte for x followed by one byte for y.
  260.  
  261. A ' R' in the stroke data indicates a 'lift pen and move' instruction.
  262.